package com.kexinxin.dao;

import java.util.Map;

import com.kexinxin.bean.Comment;


public interface CommentDao {

	/**
	 * 找出特定用户对特定试题的评价
	 * 
	 * @param params
	 *            Map对象，包含两个整型参数，key必须分别是questionId和userId
	 * @return 评价
	 */
	Comment selectByQuestionIdAndUserId(Map<String, Integer> params);

	/**
	 * 添加评论
	 * 
	 * @param record
	 * @return
	 */
	int insert(Comment record);

	/**
	 * 更新评论
	 * 
	 * @param record
	 * @return
	 */
	int updateByPrimaryKey(Comment record);

	int deleteByPrimaryKey(Integer commentId);

	int insertSelective(Comment record);

	Comment selectByPrimaryKey(Integer commentId);

	int updateByPrimaryKeySelective(Comment record);

}